<script>
    $(function() {
        $("a").button();
        $("a").click(function() { return true; });
    });
</script>

<div style="width: 100%;height: 100%;background-color: #222222" align="center">
    <div style="width: 80%;height: 100%;background-color:#eeeeee" align="center" class="ui-widget ui-corner-all">
<div style="width: 100%;padding: 10px" align="left"><a href="<?php echo url::base()?>/admin/main" class="ui-button ui-widget ui-state-default ui-corner-all">กลับสู่หน้าหลัก</a></div>
        <br>
        <table width="700" style="background-color: white;border: 1px solid black" cellspacing="0" cellpadding="3">
            <thead>
                <tr style="background-color: navy;color: white"><td colspan="8" align="center">รายชื่อคุณหมอทั้งหมด</td></tr>
            </thead>
            <tbody align="left">
                <tr style="background-color: teal;color: white">
                    <td align="center">ชื่อ - นามสกุล</td><td align="center">โรงพยาบาล</td><td align="center">เบอร์โทรศัพท์</td><td align="center">อีเมล์</td><td>แก้ไข</td><td>ลบ</td>
                </tr>
                        <?php
                        foreach($doctor_list as $item) {
                            echo "<tr>";
                            echo "<td>".$item['consult_doctor_name']."</td>";
                            echo "<td>".$item['consult_doctor_hospital']."</td>";
                            echo "<td>".$item['consult_tel']."</td>";
                            echo "<td>".$item['consult_email']."</td>";
                            echo "<td>".html::anchor("admin/doctor_edit?consult_doctor_id=".$item['consult_doctor_id'],html::image("assets/icon/pencil_48.png",array('width'=>'24','height','24','alt'=>'edit','border'=>'0'))) ."</td>";
                            echo "<td>".html::anchor("admin/doctor_del?consult_doctor_id=".$item['consult_doctor_id'],html::image("assets/icon/cross_48.png",array('width'=>'24','height','24','alt'=>'del','border'=>'0'))) ."</td>";
                            echo "</tr>";
                        }
                        ?>
            </tbody>
        </table>
        <br>
        <a href="<?php echo url::base()?>/admin/doctor_add" class="ui-button ui-widget ui-state-default ui-corner-all">เพิ่มคุณหมอ</a>
        
    </div>
</div>